package com.yunke.entity.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

/**
 * 菜单DTO
 * 
 * @author yunke
 * @since 1.0.0
 */
@Data
@Schema(name = "YunkeMenuDto", description = "菜单DTO")
public class YunkeMenuDto {

    @Schema(description = "菜单ID")
    private Long id;

    @Schema(description = "父菜单ID")
    private Long parentId = 0L;

    @NotBlank(message = "菜单名称不能为空")
    @Size(max = 50, message = "菜单名称长度不能超过50个字符")
    @Schema(description = "菜单名称", required = true)
    private String menuName;

    @NotBlank(message = "菜单编码不能为空")
    @Size(max = 20, message = "菜单编码长度不能超过20个字符")
    @Schema(description = "菜单编码", required = true)
    private String menuCode;

    @Schema(description = "菜单路径")
    private String path;

    @Schema(description = "组件路径")
    private String component;

    @Schema(description = "权限标识")
    private String permission;

    @NotNull(message = "菜单类型不能为空")
    @Schema(description = "菜单类型（1目录 2菜单 3按钮）", required = true)
    private Integer menuType;

    @Schema(description = "菜单图标")
    private String icon;

    @Schema(description = "是否显示（0否 1是）")
    private Boolean visible = true;

    @Schema(description = "是否启用（0否 1是）")
    private Boolean enabled = true;

    @Schema(description = "是否缓存（0否 1是）")
    private Boolean keepAlive = false;

    @Schema(description = "是否外链（0否 1是）")
    private Boolean isFrame = false;

    @Schema(description = "排序号")
    private Integer sortOrder = 0;

    @Schema(description = "备注")
    private String remark;
} 